/*   1:    */ package org.intellij.images.ui;
/*   2:    */ 
/*   3:    */

import com.intellij.openapi.util.text.StringUtil;
import org.jetbrains.annotations.NonNls;

import javax.swing.*;

/*   4:    */
/*   5:    */
/*   6:    */
/*   7:    */
/*   8:    */ 
/*   9:    */ public class ThumbnailComponent
/*  10:    */   extends JComponent
/*  11:    */ {
/*  12:    */   @NonNls
/*  13:    */   private static final String a = "format";
/*  14:    */   @NonNls
/*  15:    */   private static final String b = "fileSize";
/*  16:    */   @NonNls
/*  17:    */   private static final String c = "fileName";
/*  18:    */   @NonNls
/*  19:    */   private static final String d = "directory";
/*  20:    */   @NonNls
/*  21:    */   private static final String e = "imagesCount";
/*  22:    */   @NonNls
/*  23:    */   private static final String f = "ThumbnailComponentUI";
/*  24:    */   
/*  25:    */   static
/*  26:    */   {
/*  27: 51 */     UIManager.getDefaults().put("ThumbnailComponentUI", ThumbnailComponentUI.class.getName());
/*  28:    */   }
/*  29:    */   
/*  30: 57 */   private final ImageComponent g = new ImageComponent();
/*  31:    */   private String h;
/*  32:    */   private long i;
/*  33:    */   private String j;
/*  34:    */   private boolean k;
/*  35:    */   private int l;
/*  36:    */   
/*  37:    */   public ThumbnailComponent()
/*  38:    */   {
/*  39: 66 */     updateUI();
/*  40:    */   }
/*  41:    */   
/*  42:    */   public ImageComponent getImageComponent()
/*  43:    */   {
/*  44: 70 */     return this.g;
/*  45:    */   }
/*  46:    */   
/*  47:    */   public String getFormat()
/*  48:    */   {
/*  49: 74 */     return this.h;
/*  50:    */   }
/*  51:    */   
/*  52:    */   public void setFormat(String paramString)
/*  53:    */   {
/*  54: 78 */     String str = this.h;
/*  55: 79 */     if (((str != null) && (!str.equals(paramString))) || ((str == null) && (paramString != null)))
/*  56:    */     {
/*  57: 80 */       this.h = paramString;
/*  58: 81 */       firePropertyChange("format", str, this.h);
/*  59:    */     }
/*  60:    */   }
/*  61:    */   
/*  62:    */   public long getFileSize()
/*  63:    */   {
/*  64: 86 */     return this.i;
/*  65:    */   }
/*  66:    */   
/*  67:    */   public void setFileSize(long paramLong)
/*  68:    */   {
/*  69: 90 */     long l1 = this.i;
/*  70: 91 */     if (l1 != paramLong)
/*  71:    */     {
/*  72: 92 */       this.i = paramLong;
/*  73: 93 */       firePropertyChange("fileSize", new Long(l1), new Long(this.i));
/*  74:    */     }
/*  75:    */   }
/*  76:    */   
/*  77:    */   public String getFileName()
/*  78:    */   {
/*  79: 98 */     return this.j;
/*  80:    */   }
/*  81:    */   
/*  82:    */   public void setFileName(String paramString)
/*  83:    */   {
/*  84:102 */     String str = this.j;
/*  85:103 */     if (((str != null) && (!str.equals(paramString))) || ((str == null) && (paramString != null)))
/*  86:    */     {
/*  87:104 */       this.j = paramString;
/*  88:105 */       firePropertyChange("fileName", str, this.j);
/*  89:    */     }
/*  90:    */   }
/*  91:    */   
/*  92:    */   public boolean isDirectory()
/*  93:    */   {
/*  94:110 */     return this.k;
/*  95:    */   }
/*  96:    */   
/*  97:    */   public void setDirectory(boolean paramBoolean)
/*  98:    */   {
/*  99:114 */     boolean bool = this.k;
/* 100:115 */     if (bool != paramBoolean)
/* 101:    */     {
/* 102:116 */       this.k = paramBoolean;
/* 103:117 */       firePropertyChange("directory", bool, this.k);
/* 104:    */     }
/* 105:    */   }
/* 106:    */   
/* 107:    */   public int getImagesCount()
/* 108:    */   {
/* 109:122 */     return this.l;
/* 110:    */   }
/* 111:    */   
/* 112:    */   public void setImagesCount(int paramInt)
/* 113:    */   {
/* 114:126 */     int m = this.l;
/* 115:127 */     if (m != paramInt)
/* 116:    */     {
/* 117:128 */       this.l = paramInt;
/* 118:129 */       firePropertyChange("imagesCount", m, this.l);
/* 119:    */     }
/* 120:    */   }
/* 121:    */   
/* 122:    */   public String getFileSizeText()
/* 123:    */   {
/* 124:134 */     return StringUtil.formatFileSize(this.i);
/* 125:    */   }
/* 126:    */   
/* 127:    */   public void updateUI()
/* 128:    */   {
/* 129:138 */     setUI(UIManager.getUI(this));
/* 130:    */   }
/* 131:    */   
/* 132:    */   public String getUIClassID()
/* 133:    */   {
/* 134:142 */     return "ThumbnailComponentUI";
/* 135:    */   }
/* 136:    */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.images.ui.ThumbnailComponent

 * JD-Core Version:    0.7.0.1

 */